<template>
  <div id="Boss_Detail">
    <!-- 返回导航条 -->
 <span>搜索</span><input v-model='search' placeholder="请输入关键字/日期/类别">
  
    <!-- 项目组 -->
    
  
    <div v-for="item in lists" class="media-1-4">
      <mt-header :title="item.title" id="cell_1">
        
        <mt-button slot="right" @click="showDetail(item._id)">详细</mt-button>
      </mt-header>
      <div id="item_time">
        {{item.created_at}}
      </div>
      <div id="item_poster">
        发布者：{{item.poster}}
      </div>
    </div>

  </div>
</template>

<script>
import Vue from 'vue'

export default {
  name: 'Boss_Detail',
  data() {
    return {
      search:'',
      value1: false,
      lists: [],
      title: '',
      poster: '',
      rating: null,
      introduction: '',
      message_id: ''
   
    }
  },
  created() {
    this.$store.dispatch({
      type: 'getMessage',
      callback: (result) => {
        this.lists = result.data;
       
      }
    });
  },
  methods: {

    showDetail(_id) {
      this.$router.push(`/item/${_id}`)
    },
   },
   computed:{
    list:function(){
      var search=this.search;
      if(search){
        return this.lists.filter(function(list){
          return Object.keys(list).some(function(key){
             return String(ls[key]).toLowerCase().indexOf(search)>-1
          })

        })
      }
      return this.lists;
    }

   }
}

</script>


<style>
#cell_1 {
  border-radius: 20px 20px;
  background-color: transparent !important;
  color: rgba(255, 255, 255, 1) !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid black !important;
}

#Boss_Detail_name {
  color: gray;
  font-size: 14px;
  text-align: left;
  margin-bottom: 30px;
}

#item_poster {
  color: rgba(0, 0, 0, 0.7);
  margin-top: 10px;
  text-align: right;
  font-size: 13px;
}

#item_time {
  padding-left: 20px;
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.7);
  float: left;
  text-align: left;
  font-size: 13px;
}

.media-1-4 {
  margin-bottom: 10px;
  border-radius: 0px 60px;
  height: 80px;
  border: 1px solid rgba(168, 40, 53, 1);
  padding-left: 10px;
  padding-right: 20px;
  padding-top: 20px;
}
</style>
